﻿@model AutomatedTestDataManagement.Models.FieldType

@{
    ViewBag.Title = "Delete";
}

<h2>Delete Field Type</h2>

<h3>Are you sure you want to delete @Model.FieldTypeName?</h3>
<fieldset>
    <legend>FieldType</legend>

    <div class="display-label">
         @Html.Label("Field Type Name")
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.FieldTypeName)
    </div>

    <div class="display-label">
         @Html.Label("HTML Field")
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.IsHTML)
    </div>
</fieldset>
@using (Html.BeginForm()) {
    <div>
        @Html.ValidationSummary(true)
        @if(ViewData.ModelState.IsValid)
        {
            <input type="submit" value="Delete" /> @Html.Encode(" | ")
        }
        else
        {
            <table>
                <tr>
                    <th>Field Name</th>
                </tr>
                @Html.EditorFor(m => m.HTMLFields)
                <tr>
                    @Html.ActionLink("Manage Fields", "Index", "HTMLField")
                </tr>
            </table>
        }
        @Html.ActionLink("Back to List", "Index")
    </div>
}
@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
